﻿using CatUtils.Utils.Currency;
using CatUtils.Utils.Currency.TextUtils;
using RabbitDownload.Helper.Currency;
using System;
using System.Windows.Forms;

namespace RabbitDownload.WebSite.Yande.Tag
{
    public partial class YandeTagControl : UserControl
    {
        public YandeTagControl()
        {
            InitializeComponent();
            InitView();
        }

        private void InitView()
        {
            comboBox1.SelectedIndex = 0;
            YandeStaticValue.ImgScore = TextHelper.StringToInt(textBox3.Text);

            YandeStaticValue.ExcludeFlag = checkBox1.Checked;
        }

        private void textBox3_KeyPress(object sender, KeyPressEventArgs e)
        {
            Helper.ViewHelper.TextBoxHelper.PrintCount(e);
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            YandeStaticValue.DownLoadMode = comboBox1.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            YandeTagScanner.Start(textBox1.Text);
        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            YandeStaticValue.ImgScore = TextHelper.StringToInt(textBox3.Text);
        }

        private void textBox3_KeyPress_1(object sender, KeyPressEventArgs e)
        {
            Helper.ViewHelper.TextBoxHelper.PrintCount(e);
        }

        private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
        {
            Helper.ViewHelper.TextBoxHelper.PrintCount(e);
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            YandeStaticValue.ExcludeFlag = checkBox1.Checked;
        }
    }
}